Some commands, like \chapter
, use the \thispagestyle
command to automatically switch to the plain page style, thus
ignoring the page style currently in effect. To customize even such
pages use the fancyplain page style. This page style sets up
fancy for normal pages and in addition redefines the page style
plain to conform more to the page style fancy.
For instance, if
all the page numbers are bold, you may want this on the first page also.
You do this with the command
\pagestyle{fancyplain}Note that this does not issue a
\pagestyle{plain}
or
\thispagestyle{plain}
command. This is either done by (for
instance, for the first page of a chapter in the book
class), or you
have to do it explicitly with the
\thispagestyle{plain}command.
The redefinition of the plain style is done with the command
\fancyplain{plain_value}{normal_value}inserted into all the appropriate arguments. As an example, let us redefine the plain style for the report in Section by making the page number bold.
The leftheader definition:
\lhead[]{\bfseries The performance of new graduates}changes to
\lhead[\fancyplain{}{}]{\fancyplain{}{\bfseries The performance of new graduates}}Note that the first argument of both
\fancyplain
commands is
empty, since the redefined plain style has an empty leftheader. (The
\fancyplain{}{}
is superfluous but for symmetry reasons it is given
in this example.)
The left- and rightfooter definitions change more. For instance, the leftfooter definition changes from
\lfoot[\thepage]{From: K. Grant}to
\lfoot[\fancyplain{}{\bfseries \thepage}] {\fancyplain{}{From: K. Grant}}
Carrying out these changes for all six fields, we get the code:
\lhead[\fancyplain{}{}]{\fancyplain{}{\bfseries The performance of new graduates}} \chead{\fancyplain{}{}} \rhead[\fancyplain{}{\bfseries The performance of new graduates}]{\fancyplain{}{}} \lfoot[\fancyplain{}{\thepage}]{\fancyplain{}{From: K. Grant}} \cfoot[\fancyplain{\bfseries \thepage}{From: K. Grant}]{\fancyplain{\bfseries \thepage}{To: Dean A. Smith}} \rfoot[\fancyplain{}{To: Dean A. Smith}]{\fancyplain{}% {\bfseries \thepage}} \setlength{\headrulewidth}{0.4pt} \setlength{\footrulewidth}{0.4pt}
For the ``fancy plain'' page style, the thickness of the lines is defined by
(both default to 0pt). Observe that you may have different ``fancy plain'' page styles for even and odd pages.To use the ``fancy plain'' page style, define these macros; in the preamble, include
\usepackage{fancyheadings} \pagestyle{fancyplain}and invoke the page style ``fancy plain'' with
\thispagestyle{plain}where desired.